<?php
if($conf['cdnpublic']==1){
	$cdnpublic = '//lib.baomitu.com/';
}elseif($conf['cdnpublic']==2){
	$cdnpublic = 'https://cdn.bootcdn.net/ajax/libs/';
}elseif($conf['cdnpublic']==4){
	$cdnpublic = '//s1.pstatp.com/cdn/expire-1-M/';
}else{
	$cdnpublic = '//cdn.staticfile.org/';
}
if(!empty($conf['staticurl'])){
	$cdnserver = '//'.$conf['staticurl'].'/';
}else{
	$cdnserver = '../';
}

if(substr($suprow['user'],0,3)=='qq_' && !empty($suprow['nickname'])){
	$nickname = htmlspecialchars($suprow['nickname']);
}else{
	$nickname = $suprow['user'];
}
if(empty($suprow['qq']) && !empty($suprow['faceimg'])){
	$faceimg = htmlspecialchars($suprow['faceimg']);
}elseif(!empty($suprow['qq'])){
	$faceimg = '//q4.qlogo.cn/headimg_dl?dst_uin='.$suprow['qq'].'&spec=100';
}else{
	$faceimg = '../assets/img/user.png';
}

$newuserhead=null;
$newuserfoot=null;
$template_route = \lib\Template::loadRoute();
if($template_route){
	$newuserhead = $template_route['userhead'];
	$newuserfoot = $template_route['userfoot'];
	if($template_route['userindex'] && checkIfActive(',index')){
		include($template_route['userindex']);exit;
	}
}
if($newuserhead){
	include($newuserhead);
	return;
}

@header('Content-Type: text/html; charset=UTF-8');
?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8" />
  <title><?php echo $title ?></title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <link href="<?php echo $cdnpublic?>twitter-bootstrap/3.4.1/css/bootstrap.min.css" rel="stylesheet"/>
  <link href="<?php echo $cdnpublic?>font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
  <link rel="stylesheet" href="<?php echo $cdnserver?>assets/user/css/animate.css" type="text/css" />
  <link rel="stylesheet" href="<?php echo $cdnserver?>assets/user/css/app.css" type="text/css" />
  <style>
  /* 全局苹果风格重置 */
  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f2f2f7;
    color: #1c1c1e;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  
  /* 苹果风格导航栏 */
  .apple-navbar {
      background-color: #ffffff;
      border: none;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
      border-radius: 0;
      height: 44px;
      min-height: 44px;
  }
  
  .apple-navbar .navbar-brand {
      color: #007aff !important;
      font-weight: 600;
      font-size: 17px;
      line-height: 44px;
      padding: 0 15px;
      height: 44px;
  }
  
  .apple-navbar .navbar-brand i {
      margin-right: 8px;
      font-size: 18px;
  }
  
  /* 苹果风格按钮 */
  .apple-btn {
      border-radius: 10px;
      border: none;
      background: #007aff;
      color: white;
      font-weight: 500;
      font-size: 14px;
      padding: 8px 16px;
      transition: all 0.2s ease;
  }
  
  .apple-btn:hover {
      background: #0056b3;
      color: white;
  }
  
  /* 苹果风格侧边栏 */
  .apple-aside {
      background-color: #ffffff;
      border-right: 1px solid #e5e5ea;
      width: 220px;
      height: calc(100vh - 44px);
      overflow-y: auto;
  }
  
  .apple-aside .nav > li > a {
      color: #1c1c1e;
      border-radius: 10px;
      padding: 12px 16px;
      margin: 4px 8px;
      font-size: 14px;
      transition: all 0.2s ease;
      border: none;
  }
  
  .apple-aside .nav > li > a:hover,
  .apple-aside .nav > li.active > a {
      background-color: #f2f2f7;
      color: #007aff;
  }
  
  .apple-aside .nav > li > a i {
      margin-right: 12px;
      width: 16px;
      text-align: center;
      font-size: 16px;
  }
  
  .apple-aside .nav-sub {
      background-color: transparent;
      margin-left: 24px;
  }
  
  .apple-aside .nav-sub > li > a {
      padding: 8px 16px;
      color: #8e8e93;
      font-size: 13px;
      border-radius: 6px;
  }
  
  .apple-aside .nav-sub > li > a:hover {
      background-color: #f2f2f7;
      color: #1c1c1e;
  }
  
  /* 用户下拉菜单 */
  .user-dropdown .dropdown-toggle {
      color: #1c1c1e !important;
      border-radius: 10px;
      padding: 4px 12px;
      background-color: transparent;
      border: none;
      display: flex;
      align-items: center;
  }
  
  .user-dropdown .dropdown-toggle:hover {
      background-color: #f2f2f7;
  }
  
  .user-avatar {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      margin-right: 8px;
      border: none;
  }
  
  .user-dropdown .dropdown-menu {
      border-radius: 13px;
      border: 1px solid #e5e5ea;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
      padding: 8px 0;
      min-width: 200px;
  }
  
  .user-dropdown .dropdown-menu li a {
      padding: 8px 16px;
      color: #1c1c1e;
      font-size: 14px;
  }
  
  .user-dropdown .dropdown-menu li a:hover {
      background-color: #f2f2f7;
      color: #007aff;
  }
  
  .user-dropdown .dropdown-menu .divider {
      margin: 8px 0;
      background-color: #e5e5ea;
  }
  
  /* 面包屑导航 */
  .breadcrumb-apple {
      background-color: transparent;
      color: #8e8e93;
      border-radius: 0;
      padding: 16px 20px;
      margin: 0;
      border: none;
      font-size: 14px;
  }
  
  .breadcrumb-apple a {
      color: #007aff;
  }
  
  .breadcrumb-apple a:hover {
      color: #0056b3;
      text-decoration: none;
  }
  
  .breadcrumb-apple > li + li:before {
      color: #8e8e93;
      content: ">";
      padding: 0 8px;
  }
  
  /* 分割线 */
  .section-divider {
      background-color: #e5e5ea;
      height: 1px;
      margin: 16px 0;
  }
  
  /* 菜单项标题 */
  .menu-title {
      color: #8e8e93;
      font-size: 12px;
      font-weight: 600;
      text-transform: uppercase;
      padding: 16px 16px 8px;
      letter-spacing: 0.5px;
  }
  
  /* 内容区域 */
  .app-content {
      background-color: #f2f2f7;
      margin-left: 220px;
      height: calc(100vh - 44px);
      overflow-y: auto;
  }
  
  .app-content-body {
      padding: 20px;
  }
  
  /* 响应式设计 */
  @media (max-width: 768px) {
      .apple-navbar .navbar-brand {
          font-size: 16px;
      }
      
      .apple-navbar .navbar-brand i {
          font-size: 16px;
      }
      
      .apple-aside {
          width: 200px;
      }
      
      .app-content {
          margin-left: 200px;
      }
  }
  
  /* 折叠按钮 */
  .collapse-btn {
      color: #8e8e93;
      background-color: transparent;
      border: none;
      padding: 0 15px;
      line-height: 44px;
      font-size: 18px;
  }
  
  .collapse-btn:hover {
      color: #007aff;
      background-color: transparent;
  }
  
  /* 滚动条样式 */
  ::-webkit-scrollbar {
      width: 8px;
      height: 8px;
  }
  
  ::-webkit-scrollbar-track {
      background-color: #f2f2f7;
  }
  
  ::-webkit-scrollbar-thumb {
      background-color: #c7c7cc;
      border-radius: 4px;
  }
  
  ::-webkit-scrollbar-thumb:hover {
      background-color: #a8a8ad;
  }
  </style>
    <script src="<?php echo $cdnpublic?>jquery/2.1.4/jquery.min.js"></script>
    <script src="<?php echo $cdnpublic?>twitter-bootstrap/3.4.1/js/bootstrap.min.js"></script>
    <script src="<?php echo $cdnpublic?>layer/3.1.1/layer.js"></script>
    <script src="<?php echo $cdnserver?>assets/user/js/app.js"></script>
  <!--[if lt IE 9]>
    <script src="<?php echo $cdnpublic?>html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="<?php echo $cdnpublic?>respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
</head>
<body>
<?php if($islogin3==1){
if($suprow['status']==0){
	sysmsg('你的账号已被封禁！',true);exit;
}
?>
<div class="app app-header-fixed">
  <header id="header" class="app-header navbar ng-scope apple-navbar" role="menu">
      <div class="navbar-header">
        <button class="pull-right visible-xs" ui-toggle="off-screen" target=".app-aside" ui-scroll="app">
          <i class="fa fa-bars"></i>
        </button>
        <a href="./" class="navbar-brand">
          <i class="fa fa-shopping-bag"></i>
          <span class="hidden-folded m-l-xs">供货商管理中心</span>
        </a>
      </div>

      <div class="collapse pos-rlt navbar-collapse">
        <!-- buttons -->
        <div class="nav navbar-nav hidden-xs">
          <button class="collapse-btn" ui-toggle="app-aside-folded" target=".app">
            <i class="fa fa-bars"></i>
          </button>
        </div>
        <!-- / buttons -->

        <!-- navbar right -->
        <ul class="nav navbar-nav navbar-right">
          <li class="dropdown user-dropdown">
            <a href="#" data-toggle="dropdown" class="dropdown-toggle clear">
              <img src="<?php echo $faceimg ?>" class="user-avatar">
              <span class="hidden-sm hidden-md"><?php echo $nickname ?></span>
              <b class="caret"></b>
            </a>
            <!-- dropdown -->
            <ul class="dropdown-menu animated fadeInRight">
              <li>
                <a href="./">
                  <i class="fa fa-home"></i> <span>控制台</span>
                </a>
              </li>
              <li>
                <a href="./uset.php?mod=user">
                  <i class="fa fa-user"></i> <span>修改资料</span>
                </a>
              </li>
			  <li>
                <a href="../">
                  <i class="fa fa-external-link"></i> <span>返回首页</span>
                </a>
              </li>
              <li class="divider"></li>
              <li>
                <a href="login.php?logout">
                  <i class="fa fa-sign-out"></i> <span>退出登录</span>
                </a>
              </li>
            </ul>
            <!-- / dropdown -->
          </li>
        </ul>
        <!-- / navbar right -->
      </div>
      <!-- / navbar collapse -->
  </header>
  <!-- / header -->
  <!-- aside -->
  <aside id="aside" class="app-aside hidden-xs apple-aside">
      <div class="aside-wrap">
        <div class="navi-wrap">
          <!-- nav -->
          <nav class="navi">
            <ul class="nav">
              <li class="menu-title">
                主导航
              </li>
              <li class="<?php echo checkIfActive(',index')?>">
                <a href="./">
                  <i class="fa fa-dashboard"></i>
                  <span>控制台</span>
                </a>
              </li>
			  <li class="">
                <a href="../">
                  <i class="fa fa-home"></i>
                  <span>返回首页</span>
                </a>
              </li>
              
              <div class="section-divider"></div>
              
              <li class="menu-title">
                保证金管理
              </li>
                <li class="<?php echo checkIfActive('bond')?>">
                <a href="./bond.php" class="auto">
              <span class="pull-right text-muted">
                <i class="fa fa-fw fa-angle-right text"></i>
                <i class="fa fa-fw fa-angle-down text-active"></i>
              </span>
                    <i class="fa fa-lock"></i>
                    <span>保证金管理</span>
                </a>
                    <ul class="nav nav-sub">
                        <li class="<?php echo checkIfActive('bond')?>">
                            <a href="./bond.php">
                                <span>缴纳保证金</span>
                            </a>
                        </li>
                        <li class="<?php echo checkIfActive('bond')?>">
                            <a href="./bond.php?act=thaw">
                                <span>解冻保证金</span>
                            </a>
                        </li>
                    </ul>
                </li>
                
                <div class="section-divider"></div>
                
                <li class="menu-title">
                    供货管理
                </li>
                <li class="<?php echo checkIfActive('shoplist,shopedit')?>">
                    <a href="./shoplist.php" class="auto">
                  <span class="pull-right text-muted">
                    <i class="fa fa-fw fa-angle-right text"></i>
                    <i class="fa fa-fw fa-angle-down text-active"></i>
                  </span>
                        <i class="fa fa-cubes"></i>
                        <span>供货管理</span>
                    </a>
                    <ul class="nav nav-sub">
                        <li class="<?php echo checkIfActive('shoplist')?>">
                            <a href="./shoplist.php">
                                <span>商品管理</span>
                            </a>
                        </li>
                        <li class="<?php echo checkIfActive('fakalist')?>">
                            <a href="./fakalist.php">
                                <span>卡密管理</span>
                            </a>
                        </li>
                    </ul>
                </li>
                
                <div class="section-divider"></div>
                
			  <li class="menu-title">
                查询统计
              </li>
              <li class="<?php echo checkIfActive('record')?>">
                <a href="./record.php">                      
                  <i class="fa fa-chart-bar"></i>
                  <span>收支明细</span>
                </a>
              </li>
              
              <div class="section-divider"></div>
              
              <li class="menu-title">          
                系统设置
              </li>
              <li class="<?php echo checkIfActive('uset')?>">
                <a href="./uset.php?mod=user" class="auto">      
                  <span class="pull-right text-muted">
                    <i class="fa fa-fw fa-angle-right text"></i>
                    <i class="fa fa-fw fa-angle-down text-active"></i>
                  </span>
                  <i class="fa fa-cog"></i>
                  <span>系统设置</span>
                </a>
                <ul class="nav nav-sub">
			  <li class="<?php echo checkIfActive('user')?>">
                    <a href="./uset.php?mod=user">
                      <span>用户资料设置</span>
                    </a>
                  </li>
                  <li class="<?php echo checkIfActive('skimg')?>">
                    <a href="./uset.php?mod=skimg">
                      <span>收款图设置</span>
                    </a>
                  </li>
                </ul>
              </li>
              
              <div class="section-divider"></div>
              
              <li>
                <a href="login.php?logout">
                  <i class="fa fa-sign-out"></i>
                  <span>退出登录</span>
                </a>
              </li>
            </ul>
          </nav>
        </div>
      </div>
  </aside>
<div id="content" class="app-content" role="main">
    <div class="app-content-body">
			<div class="breadcrumb-apple">
				<ul class="breadcrumb">
					<li><a href="./">管理中心</a></li>
					<li><?php echo $title ?></li>
				</ul>
			</div>
  <!-- / aside -->
<?php }?>

